Integrand size = 36, antiderivative size = 174 \[ \int (a+a \sin (e+f x))^m (A+B \sin (e+f x)) (c-c \sin (e+f x))^n \, dx=\frac {2^{\frac {1}{2}+n} c (B (m-n)+A (1+m+n)) \cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2} (1+2 m),\frac {1}{2} (1-2 n),\frac {1}{2} (3+2 m),\frac {1}{2} (1+\sin (e+f x))\right ) (1-\sin (e+f x))^{\frac {1}{2}-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+n}}{f (1+2 m) (1+m+n)}-\frac {B \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n}{f (1+m+n)} \]
[Out]
Time = 0.23 (sec) , antiderivative size = 174, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.139, Rules used = {3052, 2824, 2768, 72, 71} \[ \int (a+a \sin (e+f x))^m (A+B \sin (e+f x)) (c-c \sin (e+f x))^n \, dx=\frac {c 2^{n+\frac {1}{2}} (A (m+n+1)+B (m-n)) \cos (e+f x) (1-\sin (e+f x))^{\frac {1}{2}-n} (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-1} \operatorname {Hypergeometric2F1}\left (\frac {1}{2} (2 m+1),\frac {1}{2} (1-2 n),\frac {1}{2} (2 m+3),\frac {1}{2} (\sin (e+f x)+1)\right )}{f (2 m+1) (m+n+1)}-\frac {B \cos (e+f x) (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^n}{f (m+n+1)} \]
[In]
[Out]
Rule 71
Rule 72
Rule 2768
Rule 2824
Rule 3052
Rubi steps \begin{align*} \text {integral}& = -\frac {B \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n}{f (1+m+n)}+\left (A+\frac {B (m-n)}{1+m+n}\right ) \int (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n \, dx \\ & = -\frac {B \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n}{f (1+m+n)}+\left (\left (A+\frac {B (m-n)}{1+m+n}\right ) \cos ^{-2 m}(e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^m\right ) \int \cos ^{2 m}(e+f x) (c-c \sin (e+f x))^{-m+n} \, dx \\ & = -\frac {B \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n}{f (1+m+n)}+\frac {\left (c^2 \left (A+\frac {B (m-n)}{1+m+n}\right ) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{\frac {1}{2} (-1-2 m)+m} (c+c \sin (e+f x))^{\frac {1}{2} (-1-2 m)}\right ) \text {Subst}\left (\int (c-c x)^{-m+\frac {1}{2} (-1+2 m)+n} (c+c x)^{\frac {1}{2} (-1+2 m)} \, dx,x,\sin (e+f x)\right )}{f} \\ & = -\frac {B \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n}{f (1+m+n)}+\frac {\left (2^{-\frac {1}{2}+n} c^2 \left (A+\frac {B (m-n)}{1+m+n}\right ) \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-\frac {1}{2}+\frac {1}{2} (-1-2 m)+m+n} \left (\frac {c-c \sin (e+f x)}{c}\right )^{\frac {1}{2}-n} (c+c \sin (e+f x))^{\frac {1}{2} (-1-2 m)}\right ) \text {Subst}\left (\int \left (\frac {1}{2}-\frac {x}{2}\right )^{-m+\frac {1}{2} (-1+2 m)+n} (c+c x)^{\frac {1}{2} (-1+2 m)} \, dx,x,\sin (e+f x)\right )}{f} \\ & = \frac {2^{\frac {1}{2}+n} c \left (A+\frac {B (m-n)}{1+m+n}\right ) \cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2} (1+2 m),\frac {1}{2} (1-2 n),\frac {1}{2} (3+2 m),\frac {1}{2} (1+\sin (e+f x))\right ) (1-\sin (e+f x))^{\frac {1}{2}-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+n}}{f (1+2 m)}-\frac {B \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n}{f (1+m+n)} \\ \end{align*}
\[ \int (a+a \sin (e+f x))^m (A+B \sin (e+f x)) (c-c \sin (e+f x))^n \, dx=\int (a+a \sin (e+f x))^m (A+B \sin (e+f x)) (c-c \sin (e+f x))^n \, dx \]
[In]
[Out]
\[\int \left (a +a \sin \left (f x +e \right )\right )^{m} \left (A +B \sin \left (f x +e \right )\right ) \left (c -c \sin \left (f x +e \right )\right )^{n}d x\]
[In]
[Out]
\[ \int (a+a \sin (e+f x))^m (A+B \sin (e+f x)) (c-c \sin (e+f x))^n \, dx=\int { {\left (B \sin \left (f x + e\right ) + A\right )} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} {\left (-c \sin \left (f x + e\right ) + c\right )}^{n} \,d x } \]
[In]
[Out]
\[ \int (a+a \sin (e+f x))^m (A+B \sin (e+f x)) (c-c \sin (e+f x))^n \, dx=\int \left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{m} \left (- c \left (\sin {\left (e + f x \right )} - 1\right )\right )^{n} \left (A + B \sin {\left (e + f x \right )}\right )\, dx \]
[In]
[Out]
\[ \int (a+a \sin (e+f x))^m (A+B \sin (e+f x)) (c-c \sin (e+f x))^n \, dx=\int { {\left (B \sin \left (f x + e\right ) + A\right )} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} {\left (-c \sin \left (f x + e\right ) + c\right )}^{n} \,d x } \]
[In]
[Out]
\[ \int (a+a \sin (e+f x))^m (A+B \sin (e+f x)) (c-c \sin (e+f x))^n \, dx=\int { {\left (B \sin \left (f x + e\right ) + A\right )} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} {\left (-c \sin \left (f x + e\right ) + c\right )}^{n} \,d x } \]
[In]
[Out]
Timed out. \[ \int (a+a \sin (e+f x))^m (A+B \sin (e+f x)) (c-c \sin (e+f x))^n \, dx=\int \left (A+B\,\sin \left (e+f\,x\right )\right )\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m\,{\left (c-c\,\sin \left (e+f\,x\right )\right )}^n \,d x \]
[In]
[Out]